#include <iostream>

using namespace std;

int main() {
    // 顺序结构
    cout << "Hello, world!" << endl;

    int a = 10;
    int b = 5;

    // 选择结构
    if (a > b) {
        cout << "a is greater than b" << endl;
    } else {
        cout << "b is greater than or equal to a" << endl;
    }

    // 循环结构
    int i = 0;
    while (i < 5) {
        cout << "i = " << i << endl;
        i++;
    }

    i = 0;
    do {
        cout << "i = " << i << endl;
        i++;
    } while (i < 5);

    // for循环
    for (int j = 0; j < 5; j++) {
        cout << "j = " << j << endl;
    }

    return 0;
}